package com.example.infoconsumer.mq;

import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
@RabbitListener(queues = "info") //监听队列
public class InfoConsumer {

    @RabbitHandler
    public void receive(String data){
        System.out.println("infoConsumer:"+data);
   }
}
